From: Nikita Churaev Date: Fri, 5 Jan 2018 23:54:33 +0000 (+0300) Subject: appDisplay: Fix small app folder icons when using HIDPI X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~42 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=92f1aec3dd1a373645aa0f70016440993a8ac997;p=gnome-shell.git appDisplay: Fix small app folder icons when using HIDPI While the scale factor is taken into account for app icons, we set an explicit size when combining the into a folder icon - unless we take the factor into account, the result will be too small on HiDPI displays. https://bugzilla.gnome.org/show_bug.cgi?id=792259 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index c309471a0..3b50928b9 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1192,11 +1192,12 @@ var FolderView = new Lang.Class({ style_class: 'app-folder-icon' }); layout.hookup_style(icon); let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size); + let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor; let numItems = this._allItems.length; let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL; for (let i = 0; i < 4; i++) { - let bin = new St.Bin({ width: subSize, height: subSize }); + let bin = new St.Bin({ width: subSize * scale, height: subSize * scale }); if (i < numItems) bin.child = this._allItems[i].app.create_icon_texture(subSize); layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);